#define _CRT_SECURE_NO_WARNINGS 1
int removeDuplicates(int* nums, int numsSize) {
    int i = 0;
    int k = 0;
    for (i = 0; i < numsSize; i++)
    {
        if (nums[i] != nums[k])
            nums[++k] = nums[i];
    }
    return k + 1;
}